home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmCircles
- BorderStyle = 0 'None
- ClientHeight = 4245
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 3840
- LinkTopic = "Form1"
- ScaleHeight = 4245
- ScaleWidth = 3840
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton cmdQuit
- Caption = "Quit"
- Height = 495
- Left = 2640
- TabIndex = 2
- Top = 1200
- Width = 1095
- End
- Begin VB.CommandButton cmdMove
- Caption = "Move and Show Circle"
- Height = 495
- Left = 1560
- TabIndex = 0
- Top = 120
- Width = 2175
- End
- Begin VB.Label lblCaution
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 2040
- TabIndex = 1
- Top = 720
- Width = 1695
- End
- Attribute VB_Name = "frmCircles"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private WithEvents round As CCircle
- Attribute round.VB_VarHelpID = -1
- Private Sub Form_Load()
- Set round = New CCircle
- End Sub
- Private Sub cmdMove_Click()
- round.Move (500)
- End Sub
- Private Sub round_PositionChanged(x As Integer, y As Integer, r As Single)
- 'This event is triggered when the center of the circle changes.
- If (x + r > frmCircles.Width) Or (y + r > frmCircles.Height) Then
- lblCaution.Caption = "Circle Off Screen"
- frmCircles.ForeColor = vbRed 'Make future circles red
- End If
- End Sub
- Private Sub cmdQuit_Click()
- End
- End Sub
-